package com.lq.dubbo.consumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.lq.dubbo.service.IUseService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: springbootdubborocketmq
 * @description:
 * @author: LQ
 * @create: 2021-05-31 17:00
 */
@RestController
@RequestMapping("/user")
public class IuseController {
    /**
     * dubbo自动注入
     */
    @Reference
    private IUseService useService;

    @RequestMapping("/sayHello")
    public String sayHello(String name){
        return useService.sayHello(name);
    }
}
